//1. 请求医院列表 所有类型

//请求医院列表参数的类型
export interface getHosListSearchParamsType {
  hoscode?: string,
  hosname?: string,
  hostype?: string,
  provinceCode?: string,
  cityCode?: string,
  districtCode?: string,
  status?: 0 | 1
}

//请求医院列表的返回值中content数组中 每一条数据的类型
export interface hospitalListItemsType {
  id: string,
  createTime: string,
  updateTime: string,
  isDeleted: number,
  param: {
    hostypeString: string,
    fullAddress: string
  },
  hoscode: string,
  hosname: string,
  hostype: string,
  provinceCode: string,
  cityCode: string,
  districtCode: string,
  address: string,
  logoData: string,
  intro: string,
  route: string,
  status: 0 | 1,
  bookingRule: bookingRuleType|null
}

// bookingRule类型提出来复用
export interface  bookingRuleType{
  cycle: number,
    releaseTime: string,
    stopTime: string,
    quitDay: number,
    quitTime: string,
    rule: string[]
}


//请求医院列表的返回值中content的数组类型
export type hospitalListContentType = hospitalListItemsType[];

//请求医院列表的返回值类型
export interface hospitalListReqReturnType {
  content: hospitalListContentType,
  pageable: {
    sort: {
      sorted: boolean,
      unsorted: boolean,
      empty: boolean
    },
    pageNumber: number,
    pageSize: number,
    offset: number,
    paged: boolean,
    unpaged: boolean
  },
  totalElements: number,
  totalPages: number,
  last: boolean,
  first: boolean,
  sort: {
    sorted: boolean,
    unsorted: boolean,
    empty: boolean
  },
  numberOfElements: number,
  size: number,
  number: number,
  empty: boolean
}





// 2.请求三级联动返回值类型
// 每一项数据的类型
export interface provinceItemType{
  id: number,
  createTime: string,
  updateTime: string,
  isDeleted: number,
  param: object,
  parentId: number,
  name: string,
  value:string ,
  dictCode: string,
  hasChildren: boolean
}

// 返回值中的总数组
export type provinceReturnTypes=provinceItemType[]



//3.定义请求医院详情的返回值类型  上面类型复用
export interface hosListDatilReturnTypes{
  bookingRule?:bookingRuleType,
  hospital?:hospitalListItemsType
}

//4. 医院排班科室的返回值类型
export interface hosDepartmentItemType {
  depcode: string,
  depname: string,
  children: hosDepartmentListType | null
}

export type hosDepartmentListType = hosDepartmentItemType[]; 

//5. 某个科室的排班时间请求类型
//参数类型
export interface hosScheduleRuleParamsType {
  page: number;
  limit: number;
  hoscode: string;
  depcode: string;
}

//返回值类型
export interface bookingScheduleListItem {
  workDate: string;
  workDateMd: null;
  dayOfWeek: string;
  docCount: number;
  reservedNumber: number;
  availableNumber: number;
  status: null;
}
export type bookingScheduleListType = bookingScheduleListItem[]

export interface hosScheduleRuleReturnType {
  total: number
  bookingScheduleList: bookingScheduleListType
  baseMap: {
    hosname: string
  };
}

// 6.某个科室排班具体详情的参数类型  根据时间和科室获取详情
export interface findScheduleListParamsType{
  hoscode:string,
  depcode:string,
  workDate:string
}

export interface findScheduleListItemType {
  id: string;
  createTime: string;
  updateTime: string;
  isDeleted: number;
  param: {
    dayOfWeek: string;
    depname: string;
    hosname: string;
  };
  hoscode: string;
  depcode: string;
  title: string;
  docname: string;
  skill: string;
  workDate: string;
  workTime: number;
  reservedNumber: number;
  availableNumber: number;
  amount: number;
  status: 0 | 1;
  hosScheduleId: string;
}

export type findScheduleListType = findScheduleListItemType[];
